import request from '@/utils/request'

export const getMenu = (data: any) =>
  request({
    // url: '/menu/index',
    url: '/menu/support-report',
    method: 'post',
    data
  })
// 路径创建 /route/create
export const createRoute = (data: any) =>
  request({
    url: '/route/create',
    method: 'post',
    data
  })
// 创建菜单 /menu/create
export const createMenu = (data: any) =>
  request({
    url: 'menu/create',
    method: 'post',
    data
  })
// 修改菜单/menu/update
export const updateMenu = (data: any) =>
  request({
    url: '/menu/update',
    method: 'post',
    data
  })
// 删除菜单 POST /menu/delete
export const deleteMenu = (data: any) =>
  request({
    url: '/menu/delete',
    method: 'post',
    data
  })
// 角色/role/list
export const getRoleList = (data: any) =>
  request({
    url: '/role/list',
    method: 'post',
    data
  })
// 分配子节点/role/assign
export const roleAssign = (data: any) =>
  request({
    url: '/route/assign-to',
    method: 'post',
    data
  })
// 回收节点 /route/revoke-from
export const revokeFrom = (data: any) =>
  request({
    url: '/route/revoke-from',
    method: 'post',
    data
  })
// 报表列表接口 /menu/report-list
export const reportList = (data: any) =>
  request({
    url: '/menu/report-list',
    method: 'post',
    data
  })
